Integrand size = 19, antiderivative size = 197 \[ \int \frac {\sin (c+d x)}{x \left (a+b x^2\right )} \, dx=\frac {\operatorname {CosIntegral}(d x) \sin (c)}{a}-\frac {\operatorname {CosIntegral}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right ) \sin \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a}-\frac {\operatorname {CosIntegral}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right ) \sin \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a}+\frac {\cos (c) \text {Si}(d x)}{a}+\frac {\cos \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 a}-\frac {\cos \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{2 a} \]
[Out]
Time = 0.28 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3426, 3384, 3380, 3383} \[ \int \frac {\sin (c+d x)}{x \left (a+b x^2\right )} \, dx=-\frac {\sin \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \operatorname {CosIntegral}\left (x d+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a}-\frac {\sin \left (\frac {\sqrt {-a} d}{\sqrt {b}}+c\right ) \operatorname {CosIntegral}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 a}+\frac {\cos \left (\frac {\sqrt {-a} d}{\sqrt {b}}+c\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 a}-\frac {\cos \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (x d+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a}+\frac {\sin (c) \operatorname {CosIntegral}(d x)}{a}+\frac {\cos (c) \text {Si}(d x)}{a} \]
[In]
[Out]
Rule 3380
Rule 3383
Rule 3384
Rule 3426
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\sin (c+d x)}{a x}-\frac {b x \sin (c+d x)}{a \left (a+b x^2\right )}\right ) \, dx \\ & = \frac {\int \frac {\sin (c+d x)}{x} \, dx}{a}-\frac {b \int \frac {x \sin (c+d x)}{a+b x^2} \, dx}{a} \\ & = -\frac {b \int \left (-\frac {\sin (c+d x)}{2 \sqrt {b} \left (\sqrt {-a}-\sqrt {b} x\right )}+\frac {\sin (c+d x)}{2 \sqrt {b} \left (\sqrt {-a}+\sqrt {b} x\right )}\right ) \, dx}{a}+\frac {\cos (c) \int \frac {\sin (d x)}{x} \, dx}{a}+\frac {\sin (c) \int \frac {\cos (d x)}{x} \, dx}{a} \\ & = \frac {\operatorname {CosIntegral}(d x) \sin (c)}{a}+\frac {\cos (c) \text {Si}(d x)}{a}+\frac {\sqrt {b} \int \frac {\sin (c+d x)}{\sqrt {-a}-\sqrt {b} x} \, dx}{2 a}-\frac {\sqrt {b} \int \frac {\sin (c+d x)}{\sqrt {-a}+\sqrt {b} x} \, dx}{2 a} \\ & = \frac {\operatorname {CosIntegral}(d x) \sin (c)}{a}+\frac {\cos (c) \text {Si}(d x)}{a}-\frac {\left (\sqrt {b} \cos \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right )\right ) \int \frac {\sin \left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{\sqrt {-a}+\sqrt {b} x} \, dx}{2 a}-\frac {\left (\sqrt {b} \cos \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right )\right ) \int \frac {\sin \left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{\sqrt {-a}-\sqrt {b} x} \, dx}{2 a}-\frac {\left (\sqrt {b} \sin \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right )\right ) \int \frac {\cos \left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{\sqrt {-a}+\sqrt {b} x} \, dx}{2 a}+\frac {\left (\sqrt {b} \sin \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right )\right ) \int \frac {\cos \left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{\sqrt {-a}-\sqrt {b} x} \, dx}{2 a} \\ & = \frac {\operatorname {CosIntegral}(d x) \sin (c)}{a}-\frac {\operatorname {CosIntegral}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right ) \sin \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a}-\frac {\operatorname {CosIntegral}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right ) \sin \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right )}{2 a}+\frac {\cos (c) \text {Si}(d x)}{a}+\frac {\cos \left (c+\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}-d x\right )}{2 a}-\frac {\cos \left (c-\frac {\sqrt {-a} d}{\sqrt {b}}\right ) \text {Si}\left (\frac {\sqrt {-a} d}{\sqrt {b}}+d x\right )}{2 a} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.36 (sec) , antiderivative size = 174, normalized size of antiderivative = 0.88 \[ \int \frac {\sin (c+d x)}{x \left (a+b x^2\right )} \, dx=\frac {-i e^{-i c-\frac {\sqrt {a} d}{\sqrt {b}}} \left (e^{\frac {2 \sqrt {a} d}{\sqrt {b}}} \operatorname {ExpIntegralEi}\left (-\frac {\sqrt {a} d}{\sqrt {b}}-i d x\right )+\operatorname {ExpIntegralEi}\left (\frac {\sqrt {a} d}{\sqrt {b}}-i d x\right )-e^{2 i c} \left (e^{\frac {2 \sqrt {a} d}{\sqrt {b}}} \operatorname {ExpIntegralEi}\left (-\frac {\sqrt {a} d}{\sqrt {b}}+i d x\right )+\operatorname {ExpIntegralEi}\left (\frac {\sqrt {a} d}{\sqrt {b}}+i d x\right )\right )\right )+4 \operatorname {CosIntegral}(d x) \sin (c)+4 \cos (c) \text {Si}(d x)}{4 a} \]
[In]
[Out]
Time = 0.27 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.02
method | result | size |
derivativedivides | \(-\frac {\operatorname {Si}\left (d x +c -\frac {d \sqrt {-a b}+c b}{b}\right ) \cos \left (\frac {d \sqrt {-a b}+c b}{b}\right )+\operatorname {Ci}\left (d x +c -\frac {d \sqrt {-a b}+c b}{b}\right ) \sin \left (\frac {d \sqrt {-a b}+c b}{b}\right )}{2 a}-\frac {\operatorname {Si}\left (d x +c +\frac {d \sqrt {-a b}-c b}{b}\right ) \cos \left (\frac {d \sqrt {-a b}-c b}{b}\right )-\operatorname {Ci}\left (d x +c +\frac {d \sqrt {-a b}-c b}{b}\right ) \sin \left (\frac {d \sqrt {-a b}-c b}{b}\right )}{2 a}+\frac {\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )}{a}\) | \(200\) |
default | \(-\frac {\operatorname {Si}\left (d x +c -\frac {d \sqrt {-a b}+c b}{b}\right ) \cos \left (\frac {d \sqrt {-a b}+c b}{b}\right )+\operatorname {Ci}\left (d x +c -\frac {d \sqrt {-a b}+c b}{b}\right ) \sin \left (\frac {d \sqrt {-a b}+c b}{b}\right )}{2 a}-\frac {\operatorname {Si}\left (d x +c +\frac {d \sqrt {-a b}-c b}{b}\right ) \cos \left (\frac {d \sqrt {-a b}-c b}{b}\right )-\operatorname {Ci}\left (d x +c +\frac {d \sqrt {-a b}-c b}{b}\right ) \sin \left (\frac {d \sqrt {-a b}-c b}{b}\right )}{2 a}+\frac {\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )}{a}\) | \(200\) |
risch | \(-\frac {i {\mathrm e}^{\frac {i c b +d \sqrt {a b}}{b}} \operatorname {Ei}_{1}\left (\frac {i c b +d \sqrt {a b}-b \left (i d x +i c \right )}{b}\right )}{4 a}-\frac {i {\mathrm e}^{\frac {i c b -d \sqrt {a b}}{b}} \operatorname {Ei}_{1}\left (\frac {i c b -d \sqrt {a b}-b \left (i d x +i c \right )}{b}\right )}{4 a}+\frac {i {\mathrm e}^{i c} \operatorname {Ei}_{1}\left (-i d x \right )}{2 a}+\frac {i {\mathrm e}^{-\frac {i c b +d \sqrt {a b}}{b}} \operatorname {Ei}_{1}\left (-\frac {i c b +d \sqrt {a b}-b \left (i d x +i c \right )}{b}\right )}{4 a}+\frac {i {\mathrm e}^{-\frac {i c b -d \sqrt {a b}}{b}} \operatorname {Ei}_{1}\left (-\frac {i c b -d \sqrt {a b}-b \left (i d x +i c \right )}{b}\right )}{4 a}-\frac {{\mathrm e}^{-i c} \pi \,\operatorname {csgn}\left (d x \right )}{2 a}+\frac {{\mathrm e}^{-i c} \operatorname {Si}\left (d x \right )}{a}-\frac {i {\mathrm e}^{-i c} \operatorname {Ei}_{1}\left (-i d x \right )}{2 a}\) | \(298\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.30 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.82 \[ \int \frac {\sin (c+d x)}{x \left (a+b x^2\right )} \, dx=\frac {i \, {\rm Ei}\left (i \, d x - \sqrt {\frac {a d^{2}}{b}}\right ) e^{\left (i \, c + \sqrt {\frac {a d^{2}}{b}}\right )} + i \, {\rm Ei}\left (i \, d x + \sqrt {\frac {a d^{2}}{b}}\right ) e^{\left (i \, c - \sqrt {\frac {a d^{2}}{b}}\right )} - i \, {\rm Ei}\left (-i \, d x - \sqrt {\frac {a d^{2}}{b}}\right ) e^{\left (-i \, c + \sqrt {\frac {a d^{2}}{b}}\right )} - i \, {\rm Ei}\left (-i \, d x + \sqrt {\frac {a d^{2}}{b}}\right ) e^{\left (-i \, c - \sqrt {\frac {a d^{2}}{b}}\right )} + 4 \, \operatorname {Ci}\left (d x\right ) \sin \left (c\right ) + 4 \, \cos \left (c\right ) \operatorname {Si}\left (d x\right )}{4 \, a} \]
[In]
[Out]
\[ \int \frac {\sin (c+d x)}{x \left (a+b x^2\right )} \, dx=\int \frac {\sin {\left (c + d x \right )}}{x \left (a + b x^{2}\right )}\, dx \]
[In]
[Out]
\[ \int \frac {\sin (c+d x)}{x \left (a+b x^2\right )} \, dx=\int { \frac {\sin \left (d x + c\right )}{{\left (b x^{2} + a\right )} x} \,d x } \]
[In]
[Out]
\[ \int \frac {\sin (c+d x)}{x \left (a+b x^2\right )} \, dx=\int { \frac {\sin \left (d x + c\right )}{{\left (b x^{2} + a\right )} x} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\sin (c+d x)}{x \left (a+b x^2\right )} \, dx=\int \frac {\sin \left (c+d\,x\right )}{x\,\left (b\,x^2+a\right )} \,d x \]
[In]
[Out]